package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreConsumerMapper;
import com.ruoyi.system.domain.StoreConsumer;
import com.ruoyi.system.service.IStoreConsumerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商铺消费Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-10-14
 */
@Service
public class StoreConsumerServiceImpl implements IStoreConsumerService 
{
    @Autowired
    private StoreConsumerMapper storeConsumerMapper;

    /**
     * 查询商铺消费
     * 
     * @param id 商铺消费ID
     * @return 商铺消费
     */
    @Override
    public StoreConsumer selectStoreConsumerById(Long id)
    {
        return storeConsumerMapper.selectStoreConsumerById(id);
    }

    /**
     * 查询商铺消费列表
     * 
     * @param storeConsumer 商铺消费
     * @return 商铺消费
     */
    @Override
    public List<StoreConsumer> selectStoreConsumerList(StoreConsumer storeConsumer)
    {
        return storeConsumerMapper.selectStoreConsumerList(storeConsumer);
    }

    /**
     * 新增商铺消费
     * 
     * @param storeConsumer 商铺消费
     * @return 结果
     */
    @Override
    public int insertStoreConsumer(StoreConsumer storeConsumer)
    {
        return storeConsumerMapper.insertStoreConsumer(storeConsumer);
    }

    /**
     * 修改商铺消费
     * 
     * @param storeConsumer 商铺消费
     * @return 结果
     */
    @Override
    public int updateStoreConsumer(StoreConsumer storeConsumer)
    {
        return storeConsumerMapper.updateStoreConsumer(storeConsumer);
    }

    /**
     * 删除商铺消费对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStoreConsumerByIds(String ids)
    {
        return storeConsumerMapper.deleteStoreConsumerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商铺消费信息
     * 
     * @param id 商铺消费ID
     * @return 结果
     */
    @Override
    public int deleteStoreConsumerById(Long id)
    {
        return storeConsumerMapper.deleteStoreConsumerById(id);
    }
}
